package com.shaoyu.elasticsearch.pojo;

import com.shaoyu.elasticsearch.base.BaseDataType;

import java.util.Map;

public class SearchParam extends BaseDataType {
    /**查询数据来自的索引值 多个以","分隔*/
    private String indexs;
    /**查询数据来自的类型 多个以","分隔*/
    private String types;
    /**查询数据的起始点 默认为0*/
    private Integer from = 0;
    /**查询数据的数据量 默认为20*/
    private Integer size = 20;
    /**不知道什么东东*/
    private Boolean explain = true;
    /**
     * 查询参数<br/>
     * key值为查询类型,value为查询参数
     */
    private Map<String,Map<String,String>> queryType;
    /**
     * 过滤参数<br/>
     * key值为过滤类型,value为过滤参数
     */
    private Map<String,Map<String,String>> filter;

    public String getIndexs() {
        return indexs;
    }

    public SearchParam setIndexs(String indexs) {
        this.indexs = indexs;
        return this;
    }

    public String getTypes() {
        return types;
    }

    public SearchParam setTypes(String types) {
        this.types = types;
        return this;
    }

    public int getFrom() {
        return from;
    }

    public SearchParam setFrom(int from) {
        this.from = from;
        return this;
    }

    public int getSize() {
        return size;
    }

    public SearchParam setSize(int size) {
        this.size = size;
        return this;
    }

    public boolean isExplain() {
        return explain;
    }

    public SearchParam setExplain(boolean explain) {
        this.explain = explain;
        return this;
    }

    public Map<String, Map<String, String>> getQueryType() {
        return queryType;
    }

    public SearchParam setQueryType(Map<String, Map<String, String>> queryType) {
        this.queryType = queryType;
        return this;
    }

    public Map<String,Map<String,String>>  getFilter() {
        return filter;
    }

    public SearchParam setFilter(Map<String,Map<String,String>> filter) {
        this.filter = filter;
        return this;
    }
}
